<?php

// +---------------------------------------------+
// |     Copyright  2010 - 2018 InterPhoto       |
// |     http://www.weentech.com                 |
// |     This file may not be redistributed.     |
// +---------------------------------------------+


// ######################################################
error_reporting(0);

@include('./config/InterPhoto.config.php');


include(BASEPATH . 'includes/Class.Database.php');
include(BASEPATH . 'includes/InterPhoto.BaseUrl.php');

$DB = new DB;

$DB->database = $dbname;
$DB->server   = $servername;
$DB->user     = $dbusername;
$DB->password = $dbpassword;

$DB->connect();

$dbpassword   = '';
$DB->password = '';

$mainsettings = array();

$getmainsettings = $DB->query("SELECT varname, value FROM " . TABLE_PREFIX . "mainsettings");
while($setting = $DB->getrow($getmainsettings)) {
	$mainsettings[$setting['varname']] = $setting['value'];
}

if(!$mainsettings['siteActived']) exit();

define('T_PATH', BASEPATH.'templates/'.$mainsettings['siteDefaultTemplate'].'/');
define('T_URL', 'templates/'.$mainsettings['siteDefaultTemplate'].'/');


include(BASEPATH.'includes/InterPhoto.Functions.php');

?>